<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>总括账</title>
    <meta name="decorator" content="blank"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0"/>
    <meta content="telephone=no,email=no" name="format-detection"/>

</head>
<body>
<div id="ledgerContent">
    <style type="text/css" scoped>
        .table-bordered th, .table-bordered td {
            border-left: 1px solid #ddd;
        }

        .table th, .table td {
            line-height: 20px;
            text-align: left;
            border-top: 1px solid #ddd;
        }

        .table-bordered {
            border: 1px solid #ddd;
            border-collapse: separate;
            border-left: 0;
            border-radius: 4px;
        }
    </style>
    <div style="width: 800px;">
        <div style="width: 100%;text-align: center">
            <h3>总括财产帐</h3>
        </div>
        <c:set var="typeAmount" value="0"/>
        <c:set var="bookAmount" value="0"/>
        <c:set var="totalPrice" value="0"/>
        <table id="contentTable" style="width: 100%;" class="table table-striped table-bordered table-condensed">
            <tr>
                <th style="width:20px;">序号</th>
                <th style="width:220px;">索书号</th>
                <th style="width:120px;">种数</th>
                <th style="width:120px;">册数</th>
                <th style="width:120px;">单价和</th>
            </tr>
            <c:forEach items="${generalledger}" var="r" varStatus="status">
                <tr>
                    <td>
                        <div style="width:20px;">${status.count}</div>
                    </td>
                    <td>
                            ${r.classcode}|${r.className}
                    </td>
                    <td style="text-align:right;width:120px;">
                            ${r.count}
                    </td>
                    <td style="text-align:right;width:120px;">
                            ${r.amount}
                    </td>
                    <td style="text-align:right;width:120px;">
                            ${r.total}
                    </td>
                </tr>
                <c:set value="${typeAmount + r.count}" var="typeAmount"/>
                <c:set value="${bookAmount + r.amount}" var="bookAmount"/>
                <c:set value="${totalPrice + r.total}" var="totalPrice"/>
            </c:forEach>
            <tr>
                <td>合计：</td>
                <td style="text-align:right;"></td>
                <td style="text-align:right;">${typeAmount}</td>
                <td style="text-align:right;">${bookAmount}</td>
                <td style="text-align:right;">${totalPrice}</td>
            </tr>
        </table>
    </div>
</div>
</body>
</html>